package app.fugema.shop.main.invoice.adapter;

import com.base.common.view.adapter.connector.BaseItemMultiType;
import com.base.common.view.adapter.connector.BaseViewHolder;



import app.fugema.shop.R;
import app.fugema.shop.databinding.ItemIntegralViewBinding;
import app.fugema.shop.main.center.model.PointResultBean;


public class IntegralItemMultiType extends BaseItemMultiType<PointResultBean.IntegralBean, ItemIntegralViewBinding>
{

    @Override
    public int getLayoutId()
    {
        return R.layout.item_integral_view;
    }


    @Override
    public void onBindViewHolder(ItemIntegralViewBinding binding, int position,PointResultBean.IntegralBean bean)
    {
        super.onBindViewHolder(binding, position, bean);
        StringBuffer sbf = new StringBuffer();
        if(bean.getIntegral() > 0)
        {
            sbf.append("+");
            sbf.append(bean.getIntegral());
        }
        else
        {
            sbf.append(bean.getIntegral());
        }
        binding.tvPoint.setText(sbf.toString() );
    }

    @Override
    public void onBindViewHolder(ItemIntegralViewBinding binding, int position, BaseViewHolder viewHolder, PointResultBean.IntegralBean bean)
    {
        super.onBindViewHolder(binding, position, viewHolder, bean);
    }

}
